﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DcsGauges.Gui.Rendering;
using DcsGauges.Gui.Gauges.Interfaces;
using DcsGauges.DataStructures;
using DcsGauges.Gui.Gauges.Concrete;
using Microsoft.Xna.Framework.Graphics;

namespace DcsGauges.Gui.Gauges.Panels
{
    class AdiHsiPanel : GuiRenderableBase, IComposedGauge
    {
        private AttitudeDirectorIndicator adiGauge = null;
        public AttitudeDirectorIndicator AdiGauge
        {
            get { return this.adiGauge; }
        }

        private HsiGauge hsiGauge = null;
        public HsiGauge HsiGauge
        {
            get { return this.hsiGauge; }
        }

        public AdiHsiPanel(GuiRenderableBase parent, URect area, GraphicsDevice device) : base(parent, area)
        {
            this.adiGauge                   = new AttitudeDirectorIndicator(this, device, new URect(new ULoc(0.0f, 0.0f), new USize(1.0f, 0.5f)));
            this.hsiGauge                   = new HsiGauge(this, new URect(new ULoc(0.0f, 0.5f), new USize(1.0f, 0.5f)), device);
        }


        public override void Render(SpriteBatch spriteBatch, GraphicsDevice device, Microsoft.Xna.Framework.Rectangle parentRect, float globalZIndex)
        {
            this.adiGauge.Render(spriteBatch, device, parentRect, globalZIndex);
            this.hsiGauge.Render(spriteBatch, device, parentRect, globalZIndex);
        }
    }
}
